/*
 * @Descripttion: 护士给医师拿药
 * @version: 1.0
 * @Author: 自由如风
 * @Date: 2021-05-07 18:33:19
 * @LastEditors: 自由如风
 * @LastEditTime: 2021-05-07 18:35:50
 */

const DB = require("../../lib/DB")
const { Success } = require("../../lib/Response")
module.exports = async function (ctx, next) {
    try {
        const doctor_medicine_lib = await DB.models.doctor_medicine_lib.create(ctx.request.body)
        await next()
        ctx.body = new Success(doctor_medicine_lib.toJSON())
    } catch (e) {
        ctx.body = new Fail(e.message)
    }
}